<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="DataLoad.asp"-->
<%Call CheckAdmin2()%>

<html>
<head>
<title><%=GuildName%> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="DKP WOW GUILD">
<meta name="Description" content="">
<link href="<%=StylePath%>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<%=StylePath%>/styleplus.js"></script>
<style type="text/css" media="all">

</style>
</head>

<body>

<div class="header">
<!--#include file="menu.asp"-->
</div>
<div class="main">
<%
	if request("action")="Del" and IsNumeric(Request("id")) then Call gbookdelsql()
	Call guestlist()
	%>
  </div>
<div id="footer"><!--#include file="footer.asp"--></div>

</body>
</html>

<%
Sub guestlist()
	Dim HtmlText , Apage
	Apage=30
	SQL="select * from gbook order by id desc"
	HtmlText=HtmlText& "<table class='outframe interlace'>"
	HtmlText=HtmlText&"<tr><th colspan='5'>留言管理</th></tr>"
	HtmlText=HtmlText&"<tr class='coltitle'><td>ID</td><td>name</td><td>content</td><td>class</td><td>operation</td></tr>"
	rs.open sql,conn,1,1
	if rs.eof or rs.bof then
		HtmlText=HtmlText&"<tr><td colspan='5'>没有记录</td></tr>"
	else
		if IsNumeric(request("page")) and request("page")<>"" then 
			rs.move (request("page")-1)*Apage
		end if
		for i= 1 to Apage
		HtmlText=HtmlText&"<tr><td>"&rs("id")&"</td><td>"&htmlencode2(rs("gbook_poster"))&"</td><td>"&htmlencode2(rs("gbook_content"))&"</td>"
		HtmlText=HtmlText&"<td>"&rs("gbook_raidid")&"</td><td><a href='?Action=Del&amp;id="&rs("id")&"'>删除</a></td></tr>"
		rs.movenext
		if rs.eof then exit for
		next
	end if

	HtmlText=HtmlText&"</table>"
	HtmlText=HtmlText& pages(rs,Apage,"admin_guest.asp",10) 
	rs.close
	Response.write HtmlText
End Sub

Sub gbookdelsql()
	Sql="Delete from gbook where id="&request("id")
	conn.execute(sql)
End Sub
%>